#ifndef NET_TIMER_H_
#define NET_TIMER_H_

#include "itimer.h"

namespace net {
    
class Timer : public ITimer {
public:
    Timer();
    virtual ~Timer();

public:
    void OnTimer();

private:
    virtual void Close();
    virtual uint32_t GetTime();
    virtual void Start(uint32_t time, ITimerHandler* handler, bool isPersistent = false);

private:
    bool isStart_;
    bool isPersistent_;
    uint32_t time_;

    ITimerHandler* handler_;
};

}

#endif
